# Maintainer: Martell Malone <martellmalone@gmail.com>

_realname=premake
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=4.3
pkgrel=2
pkgdesc="A build configuration tool. Describe your build using Lua and generate \
the project files for your specific toolset (mingw-w64)"
arch=('any')
url="https://premake.sourceforge.io/"
license=('GPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
source=("https://downloads.sourceforge.net/sourceforge/premake/premake-${pkgver}-src.zip")
sha256sums=('36536490f8928d8ecde135da80cd8b751ea5bebe50cabba5c0de49cd41cb2780')

build() {
  cd "${srcdir}/${_realname}-${pkgver}/build/gmake.windows"
  CC=${MINGW_PREFIX}/bin/gcc make
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}
  install -Dm755 bin/release/premake4 ${pkgdir}${MINGW_PREFIX}/bin/premake4
}
